<template>
  <div class="app-container">
    <el-tabs :value="activeTab" @tab-click="changeTab" class="gameManager-game">
      <el-tab-pane v-if="roleCheck(gameManageRoleType.set)" name="game-manager-one" label="游戏平台设置">
        <game-platform/>
      </el-tab-pane>
      <!--<el-tab-pane name="two" label="产品端维护">-->
        <!--<product-platform/>-->
      <!--</el-tab-pane>-->
      <el-tab-pane v-if="roleCheck(gameManageRoleType.maintain)" name="game-manager-two" label="游戏平台维护">
        <platform-maintain/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import GamePlatform from "./gamePlatform"; //游戏平台维护
// import ProductPlatform from "./productPlatform"; //产品端维护
import platformMaintain from "./platformMaintain";
import { tabs } from "@/build";
import {gameManageRoleType} from '@/router/gameRoutes'
export default {
  name: "game",

  components: {
    GamePlatform,
    // ProductPlatform,
    platformMaintain
  },

  // mixins: [tabs],

  data() {
    return {
      gameManageRoleType: gameManageRoleType,
      activeTab: "game-manager-one"
    };
  },
  mounted() {
    this.$store.dispatch(types.SAVE_OPERATION_LOG, {
      content: _.getContent(this.$route, "游戏平台维护", true)
    });
  },
  methods: {
    changeTab(tabs) {
      this.activeTab = tabs.name;
      this.$store.dispatch(types.SAVE_OPERATION_LOG, {
        content: _.getContent(this.$route, tabs.label, true)
      });
    }
  }
};
</script>

<style lang="scss">
  .gameManager-game .el-tabs__content{
    height: 700px;
    overflow: auto!important;
  }
  .gameManager-game .el-tabs__content .subGameTabList .el-tabs__content{
    height: auto;
  }
</style>
